<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>Node环境配置 | 个人博客 | 一个coder的成长记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="node">
    <meta name="description" content="Node环境配置 Node环境及配置参考  nvm for windows nvm是一个Node的版本管理模块，使用它可以随时切换Node环境。 注意: 安装 node 前保证自己电脑中的node，npm已卸载干净  nvm安装  nvm-windows   查看当前版本   1nvm  --version  查看当前已安装 node 的版本   1nvm ls  安装某版本 node， 根据 L">
<meta name="keywords" content="node">
<meta property="og:type" content="article">
<meta property="og:title" content="Node环境配置">
<meta property="og:url" content="https://betgar.github.io/2018/06/01/node-env-config/index.html">
<meta property="og:site_name" content="个人博客">
<meta property="og:description" content="Node环境配置 Node环境及配置参考  nvm for windows nvm是一个Node的版本管理模块，使用它可以随时切换Node环境。 注意: 安装 node 前保证自己电脑中的node，npm已卸载干净  nvm安装  nvm-windows   查看当前版本   1nvm  --version  查看当前已安装 node 的版本   1nvm ls  安装某版本 node， 根据 L">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2019-04-12T09:42:14.470Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Node环境配置">
<meta name="twitter:description" content="Node环境配置 Node环境及配置参考  nvm for windows nvm是一个Node的版本管理模块，使用它可以随时切换Node环境。 注意: 安装 node 前保证自己电脑中的node，npm已卸载干净  nvm安装  nvm-windows   查看当前版本   1nvm  --version  查看当前已安装 node 的版本   1nvm ls  安装某版本 node， 根据 L">
    
        <link rel="alternate" type="application/atom+xml" title="个人博客" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide">
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">俊男</h5>
          <a href="mailto:betgar@163.com" title="betgar@163.com" class="mail">betgar@163.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/">
                <i class="icon icon-lg icon-home"></i>
                Home
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives">
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags">
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories">
                <i class="icon icon-lg icon-th-list"></i>
                Categories
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/betgar" target="_blank">
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://weibo.com/u/2296734915" target="_blank">
                <i class="icon icon-lg icon-weibo"></i>
                Weibo
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/about">
                <i class="icon icon-lg icon-link"></i>
                About
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Node环境配置</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">Node环境配置</h1>
        <h5 class="subtitle">
            
                <time datetime="2018-05-31T16:00:00.000Z" itemprop="datePublished" class="page-time">
  2018-06-01
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#Node环境配置"><span class="post-toc-number">1.</span> <span class="post-toc-text">Node环境配置</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#nvm-for-windows"><span class="post-toc-number">2.</span> <span class="post-toc-text">nvm for windows</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#nvm安装"><span class="post-toc-number">2.1.</span> <span class="post-toc-text">nvm安装</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#nrm管理下载源"><span class="post-toc-number">3.</span> <span class="post-toc-text">nrm管理下载源</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#nrm的安装"><span class="post-toc-number">3.1.</span> <span class="post-toc-text">nrm的安装</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#python-安装"><span class="post-toc-number">4.</span> <span class="post-toc-text">python 安装</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#python依赖-net-framework-4-5"><span class="post-toc-number">4.1.</span> <span class="post-toc-text">python依赖.net framework 4.5</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#node-gyp配置python"><span class="post-toc-number">4.2.</span> <span class="post-toc-text">node-gyp配置python</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#npm配置python"><span class="post-toc-number">4.3.</span> <span class="post-toc-text">npm配置python</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#verdaccio安装"><span class="post-toc-number">5.</span> <span class="post-toc-text">verdaccio安装</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#安装"><span class="post-toc-number">5.1.</span> <span class="post-toc-text">安装</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#启动"><span class="post-toc-number">5.2.</span> <span class="post-toc-text">启动</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#配置"><span class="post-toc-number">5.3.</span> <span class="post-toc-text">配置</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#chrome-driver安装"><span class="post-toc-number">6.</span> <span class="post-toc-text">chrome driver安装</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#vue项目使用sass"><span class="post-toc-number">7.</span> <span class="post-toc-text">vue项目使用sass</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#安装依赖"><span class="post-toc-number">7.1.</span> <span class="post-toc-text">安装依赖</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#配置webpack"><span class="post-toc-number">7.2.</span> <span class="post-toc-text">配置webpack</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#参考资料"><span class="post-toc-number">7.3.</span> <span class="post-toc-text">参考资料</span></a></li></ol></li></ol>
        </nav>
    </aside>


<article id="post-node-env-config" class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">Node环境配置</h1>
        <div class="post-meta">
            <time class="post-time" title="2018-06-01 00:00:00" datetime="2018-05-31T16:00:00.000Z" itemprop="datePublished">2018-06-01</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style="display:none">
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h2 id="Node环境配置"><a href="#Node环境配置" class="headerlink" title="Node环境配置"></a>Node环境配置</h2><blockquote>
<p>Node环境及配置参考</p>
</blockquote>
<h2 id="nvm-for-windows"><a href="#nvm-for-windows" class="headerlink" title="nvm for windows"></a>nvm for windows</h2><blockquote>
<p><code>nvm</code>是一个Node的版本管理模块，使用它可以随时切换Node环境。</p>
<p>注意: 安装 node 前保证自己电脑中的<code>node</code>，<code>npm</code>已<strong>卸载干净</strong></p>
</blockquote>
<h3 id="nvm安装"><a href="#nvm安装" class="headerlink" title="nvm安装"></a>nvm安装</h3><blockquote>
<p> <a href="https://github.com/coreybutler/nvm-windows/releases" target="_blank" rel="noopener">nvm-windows</a></p>
</blockquote>
<ul>
<li><p>查看当前版本</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nvm  --version</span><br></pre></td></tr></table></figure>
</li>
<li><p>查看当前已安装 node 的版本</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nvm ls</span><br></pre></td></tr></table></figure>
</li>
<li><p>安装某版本 node， 根据 <a href="https://github.com/nodejs/LTS" target="_blank" rel="noopener">LTS</a> 查看此处安装 8.11.1</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nvm install 8.11.1</span><br></pre></td></tr></table></figure>
</li>
<li><p>使用某版本 node </p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nvm use 8.11.1</span><br></pre></td></tr></table></figure>
</li>
<li><p>检查本地是否存在 node </p>
  <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">node -v</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="nrm管理下载源"><a href="#nrm管理下载源" class="headerlink" title="nrm管理下载源"></a>nrm管理下载源</h2><blockquote>
<p><code>nrm</code> 是为了解决切换 <code>npm</code> 源的问题，因为如果直接通过 <code>npm</code> 手动设置 registry 非常麻烦，并且不容易记忆，因此，才有了 <code>nrm</code> 的出现。<code>npm</code>的官方源对广大中国开发者来说较卡，因此推荐 <code>cnpm</code> 或者 <code>taobao</code>。 </p>
</blockquote>
<p><code>nrm</code> 是为了解决切换<code>npm</code> 源的问题，因为如果直接通过 npm 手动设置 registry 非常麻烦，并且不容易记忆，因此，才有了<code>nrm</code>的出现。 <code>npm</code>的官方源对广大中国开发者来说较卡，因此推荐 <code>cnpm</code> 或者 <code>taobao</code>。</p>
<h3 id="nrm的安装"><a href="#nrm的安装" class="headerlink" title="nrm的安装"></a>nrm的安装</h3><p>有了<code>npm</code>后，一切都变得非常简单，全局安装 <code>nrm</code>, 使用<code>taobao</code>源下载</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install -g nrm</span><br></pre></td></tr></table></figure>
<ul>
<li><p>查询当前有哪些可用源</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nrm ls</span><br></pre></td></tr></table></figure>
</li>
<li><p>切换淘宝源</p>
  <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nrm use taobao</span><br></pre></td></tr></table></figure>
</li>
<li><p>测试源延迟毫秒数 (也与当前网络环境有关)</p>
  <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nrm <span class="built_in">test</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="python-安装"><a href="#python-安装" class="headerlink" title="python 安装"></a>python 安装</h2><blockquote>
<p><code>node-gyp</code>模块需要安装python(<code>python</code> (<code>v2.7</code> recommended, <code>v3.x.x</code> is <strong>not</strong> supported)</p>
</blockquote>
<h3 id="python依赖-net-framework-4-5"><a href="#python依赖-net-framework-4-5" class="headerlink" title="python依赖.net framework 4.5"></a>python依赖.net framework 4.5</h3><blockquote>
<p>解决方式1：</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># run as Administrator</span></span><br><span class="line">npm install --global --production windows-build-tools</span><br></pre></td></tr></table></figure>
<blockquote>
<p>解决方式2：自己到微软的官网下载最新的.net framework安装。</p>
</blockquote>
<h3 id="node-gyp配置python"><a href="#node-gyp配置python" class="headerlink" title="node-gyp配置python"></a>node-gyp配置python</h3><blockquote>
<p><strong>注意：</strong></p>
<p><a href="https://github.com/nodejs/node-gyp#readme" target="_blank" rel="noopener">node-gyp官网</a></p>
<p>因为python有v2和v3版本，并且两个版本不兼容，如果电脑上有应用软件使用python的版本不同，</p>
<p>最好<strong>不要</strong>把python路径配置到系统<code>path</code>中。</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 如果你使用node-gyp单独编译一些模块，则这样配置（多数情况下是通过npm调用的）</span></span><br><span class="line">node-gyp --python /path/to/python2.7</span><br></pre></td></tr></table></figure>
<h3 id="npm配置python"><a href="#npm配置python" class="headerlink" title="npm配置python"></a>npm配置python</h3><blockquote>
<p>如果使用npm 调用的<code>node-gyp</code>，则使用<code>npm</code>配置<code>python</code>就可以</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm config <span class="built_in">set</span> python /path/to/executable/python2.7</span><br></pre></td></tr></table></figure>
<h2 id="verdaccio安装"><a href="#verdaccio安装" class="headerlink" title="verdaccio安装"></a>verdaccio安装</h2><blockquote>
<p>如果搭建npm私服可以参考。<a href="https://verdaccio.org/zh-CN/" target="_blank" rel="noopener">verdaccio官网</a></p>
<p>verdaccio是用来搭建npm私服，已经安装过的模块会缓存起来，以后安装依赖是会优先查看缓存。</p>
</blockquote>
<h3 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm i -g verdaccio</span><br></pre></td></tr></table></figure>
<h3 id="启动"><a href="#启动" class="headerlink" title="启动"></a>启动</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">verdaccio</span><br></pre></td></tr></table></figure>
<h3 id="配置"><a href="#配置" class="headerlink" title="配置"></a>配置</h3><blockquote>
<p>配置主要修改使用<code>taobao</code>源和<code>端口</code>修改</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># 配置文件地址：我的window 10是.config非官网说的.local</span><br><span class="line"># C:\Users\你的用户名称\.config\verdaccio</span><br></pre></td></tr></table></figure>
<blockquote>
<ol>
<li>修改默认端口（如果有需要）</li>
<li>添加uplinks</li>
<li>修改使用的proxy</li>
</ol>
</blockquote>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 修改默认的端口</span></span><br><span class="line"><span class="attr">listen:</span></span><br><span class="line">  <span class="number">0.0</span><span class="number">.0</span><span class="number">.0</span><span class="string">:10086</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># a list of other known repositories we can talk to</span></span><br><span class="line"><span class="attr">uplinks:</span></span><br><span class="line"><span class="attr">  npmjs:</span></span><br><span class="line"><span class="attr">    url:</span> <span class="attr">https://registry.npmjs.org/</span></span><br><span class="line">  <span class="comment"># 添加taobao</span></span><br><span class="line"><span class="attr">  taobao:</span></span><br><span class="line"><span class="attr">    url:</span> <span class="attr">https://registry.npm.taobao.org</span></span><br><span class="line"></span><br><span class="line"><span class="attr">packages:</span></span><br><span class="line">  <span class="string">'@*/*'</span><span class="string">:</span></span><br><span class="line">    <span class="comment"># scoped packages</span></span><br><span class="line"><span class="attr">    access:</span> <span class="string">$all</span></span><br><span class="line"><span class="attr">    publish:</span> <span class="string">$authenticated</span></span><br><span class="line">    <span class="comment"># 使用taobao</span></span><br><span class="line"><span class="attr">    proxy:</span> <span class="string">taobao</span> </span><br><span class="line"></span><br><span class="line">  <span class="string">'**'</span><span class="string">:</span></span><br><span class="line">    <span class="comment"># allow all users (including non-authenticated users) to read and</span></span><br><span class="line">    <span class="comment"># publish all packages</span></span><br><span class="line">    <span class="comment">#</span></span><br><span class="line">    <span class="comment"># you can specify usernames/groupnames (depending on your auth plugin)</span></span><br><span class="line">    <span class="comment"># and three keywords: "$all", "$anonymous", "$authenticated"</span></span><br><span class="line"><span class="attr">    access:</span> <span class="string">$all</span></span><br><span class="line"></span><br><span class="line">    <span class="comment"># allow all known users to publish packages</span></span><br><span class="line">    <span class="comment"># (anyone can register by default, remember?)</span></span><br><span class="line"><span class="attr">    publish:</span> <span class="string">$authenticated</span></span><br><span class="line"></span><br><span class="line">    <span class="comment"># if package is not available locally, proxy requests to 'npmjs' registry</span></span><br><span class="line"><span class="attr">    proxy:</span> <span class="string">taobao</span> <span class="comment"># 使用taobao</span></span><br></pre></td></tr></table></figure>
<h2 id="chrome-driver安装"><a href="#chrome-driver安装" class="headerlink" title="chrome driver安装"></a>chrome driver安装</h2><blockquote>
<p>使用淘宝源</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver</span><br></pre></td></tr></table></figure>
<h2 id="vue项目使用sass"><a href="#vue项目使用sass" class="headerlink" title="vue项目使用sass"></a>vue项目使用sass</h2><blockquote>
<p>如果使用<code>vue-cli</code>创建项目，并且使用<code>.vue</code>单文件，使用<code>scss</code>来写<code>CSS</code>需要安装两个依赖。</p>
<p><code>vue-cli</code>默认没有安装<code>node-sass</code>和<code>sass-loader</code>。</p>
</blockquote>
<h3 id="安装依赖"><a href="#安装依赖" class="headerlink" title="安装依赖"></a>安装依赖</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install node-sass --save-dev</span><br><span class="line">npm install sass-loader --save-dev</span><br></pre></td></tr></table></figure>
<h3 id="配置webpack"><a href="#配置webpack" class="headerlink" title="配置webpack"></a>配置webpack</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// webpack.base.config.js 中添加</span></span><br><span class="line"> &#123;</span><br><span class="line">     test: <span class="regexp">/\.scss$/</span>,</span><br><span class="line">         loaders: [<span class="string">"style"</span>, <span class="string">"css"</span>, <span class="string">"sass"</span>]</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h3 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h3><p><a href="https://github.com/QC-L/learning-node.js/blob/master/docs/01.Node.js%E7%AE%80%E4%BB%8B%E4%BB%A5%E5%8F%8A%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE.md" target="_blank" rel="noopener">Node.js简介以及环境配置</a></p>

        </div>

        <blockquote class="post-copyright">
    
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2019-04-12T09:42:14.470Z" itemprop="dateUpdated">2019-04-12 17:42:14</time>
</span><br>


        
        原文链接：<a href="/2018/06/01/node-env-config/" target="_blank" rel="external">https://betgar.github.io/2018/06/01/node-env-config/</a>
        
    </div>
    
    <footer>
        <a href="https://betgar.github.io">
            <img src="/img/avatar.jpg" alt="俊男">
            俊男
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/node/">node</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://betgar.github.io/2018/06/01/node-env-config/&title=《Node环境配置》 — 个人博客&pic=https://betgar.github.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://betgar.github.io/2018/06/01/node-env-config/&title=《Node环境配置》 — 个人博客&source=各种技术加身的coder" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://betgar.github.io/2018/06/01/node-env-config/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Node环境配置》 — 个人博客&url=https://betgar.github.io/2018/06/01/node-env-config/&via=https://betgar.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://betgar.github.io/2018/06/01/node-env-config/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2018/06/04/npm-common-commands/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">npm常用命令</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2018/04/19/jquery-best-practice/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">jQuery最佳实践</h4>
      </a>
    </div>
  
</nav>



    











    <!-- Valine Comments -->
    <div class="comments vcomment" id="comments"></div>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
    <!-- Valine Comments script -->
    <script>
        var GUEST_INFO = ['nick','mail','link'];
        var guest_info = 'nick,mail,link'.split(',').filter(function(item){
          return GUEST_INFO.indexOf(item) > -1
        });
        new Valine({
            el: '#comments',
            notify: 'false' == 'true',
            verify: 'false' == 'true',
            appId: "kiGWA9mdoVtQlfGYA5uDBNX7-gzGzoHsz",
            appKey: "dHCOdD0oEIjJd0cJoAHHN0y3",
            avatar: "mm",
            placeholder: "Just comment it",
            guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
            pageSize: "10"
        })
    </script>
    <!-- Valine Comments end -->







</article>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style="display:none">
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style="display:none">
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>俊男 &copy; 2017 - 2020</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://betgar.github.io/2018/06/01/node-env-config/&title=《Node环境配置》 — 个人博客&pic=https://betgar.github.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://betgar.github.io/2018/06/01/node-env-config/&title=《Node环境配置》 — 个人博客&source=各种技术加身的coder" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://betgar.github.io/2018/06/01/node-env-config/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Node环境配置》 — 个人博客&url=https://betgar.github.io/2018/06/01/node-env-config/&via=https://betgar.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://betgar.github.io/2018/06/01/node-env-config/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
